package com.javasm.domin.entity.stockEntity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @TableName put_storage_info
 */
@TableName(value ="put_storage_info")
@Data
public class PutStorageInfo implements Serializable {
    /**
     *
     */
    @TableId
    private Integer id;

    /**
     *
     */
    private String buye;

    /**
     *
     */
    private String purchaseCode;

    /**
     *
     */
    private Date purchaseOrderTime;

    /**
     *
     */
    private Integer purchaseStatusId;

    /**
     *
     */
    private Integer purchaseTypeId;

    /**
     *
     */
    private String supplierCode;

    /**
     *
     */
    private String supplierName;

    /**
     *
     */
    private Integer goodsId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PutStorageInfo other = (PutStorageInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getBuye() == null ? other.getBuye() == null : this.getBuye().equals(other.getBuye()))
            && (this.getPurchaseCode() == null ? other.getPurchaseCode() == null : this.getPurchaseCode().equals(other.getPurchaseCode()))
            && (this.getPurchaseOrderTime() == null ? other.getPurchaseOrderTime() == null : this.getPurchaseOrderTime().equals(other.getPurchaseOrderTime()))
            && (this.getPurchaseStatusId() == null ? other.getPurchaseStatusId() == null : this.getPurchaseStatusId().equals(other.getPurchaseStatusId()))
            && (this.getPurchaseTypeId() == null ? other.getPurchaseTypeId() == null : this.getPurchaseTypeId().equals(other.getPurchaseTypeId()))
            && (this.getSupplierCode() == null ? other.getSupplierCode() == null : this.getSupplierCode().equals(other.getSupplierCode()))
            && (this.getSupplierName() == null ? other.getSupplierName() == null : this.getSupplierName().equals(other.getSupplierName()))
            && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getBuye() == null) ? 0 : getBuye().hashCode());
        result = prime * result + ((getPurchaseCode() == null) ? 0 : getPurchaseCode().hashCode());
        result = prime * result + ((getPurchaseOrderTime() == null) ? 0 : getPurchaseOrderTime().hashCode());
        result = prime * result + ((getPurchaseStatusId() == null) ? 0 : getPurchaseStatusId().hashCode());
        result = prime * result + ((getPurchaseTypeId() == null) ? 0 : getPurchaseTypeId().hashCode());
        result = prime * result + ((getSupplierCode() == null) ? 0 : getSupplierCode().hashCode());
        result = prime * result + ((getSupplierName() == null) ? 0 : getSupplierName().hashCode());
        result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", buye=").append(buye);
        sb.append(", purchaseCode=").append(purchaseCode);
        sb.append(", purchaseOrderTime=").append(purchaseOrderTime);
        sb.append(", purchaseStatusId=").append(purchaseStatusId);
        sb.append(", purchaseTypeId=").append(purchaseTypeId);
        sb.append(", supplierCode=").append(supplierCode);
        sb.append(", supplierName=").append(supplierName);
        sb.append(", goodsId=").append(goodsId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
